<template>
  <div>
    <app-header></app-header>
    <tab :line-width="2" >
      <tab-item :selected="tag === item" v-for="item in taglist" :key="item.id" @click="tag = item">{{item}}</tab-item>
    </tab>
    <product-list></product-list>
    <app-footer></app-footer>

  </div>
</template>
<style>
</style>
<script>
// import Tab from 'vux/src/components/tab'
// import TabItem from 'vux/src/components/tab-item'
import {Tab, TabItem} from 'vux'
import AppHeader from './Header'
import ProductList from './ProductList'
import AppFooter from './Footer'

export default {
  data () {
    return {
      tag: '资讯',
      taglist: ['资讯', '博客', '问答', '活动']
    }
  },
  components: {
    Tab,
    TabItem,
    AppHeader,
    ProductList,
    AppFooter
  }
}
</script>
